<?php
include 'Db.php';

$config = [
    'master' =>[
        'host' => '127.0.0.1',
        'dbname' => 'mysql',
        'username' => 'root',
        'password' => 'dream',
        'port' => '3306',
    ], 
    'slaves' =>[[
        'host' => '127.0.0.1',
        'dbname' => 'mysql',
        'username' => 'root',
        'password' => 'dream',
        'port' => '3306',
    ]],
];

$db = \Core\Db::getInstance($config);

//$data = $db->table('help_topic')->rows('select * from help_topic limit 2;select * from help_topic limit 1;');
//$data = $db->table('help_topic')->single('select * from @table limit 2;',null,null);
//$data = $db->table('help_topic')->rows('select 1; select 2; select 3; select 4;');
//$data = $db->table('help_topic')->limit(1)->get();
//$data = $db->table('help_topic')->where('[#]help_topic_id+1 =1')->get();
//$res = $db->table('help_topic')->where('[#]help_topic_id+1 =1');
$res = $db->table('help_topic')->where('[#]help_topic_id =10');
$data = $res->explain();
$cnt = $res->count('help_topic_id');
print_R($data);
print_R($cnt);
//echo $db->debugDumpParams();

//print_R($data);
